from gopigo import *
from functools import partial
import sys, time, random, logging

speed_list = [set_left_speed, set_right_speed]
moves_list  = [left, right,fwd,bwd]

#switch delay
delaytime = random.uniform(0, 1)
number_of_moves = random.randint(5, 15)

print "Delay: %f" % delaytime
print "number_of_moves: %i" % number_of_moves
while(number_of_moves > 0):
	speed = random.randint(1, 10)
	random.choice(speed_list)(speed)
	random.choice(moves_list)()
	time.sleep(delaytime)
	number_of_moves = number_of_moves - 1

